<template>
    <div class="floating">
        <el-image
          class="iglia-ing"
          :src="getCover(content.url)"
          fit="cover"
        >
        <template #error>
            <div class="image-slot">
              <el-icon><icon-picture /></el-icon>
            </div>
          </template>
        </el-image>
        
      </div>
</template>
<script type="text/javascript">
import Picture from '/$/magic/components/image.vue'

export default {
    components: {
        Picture,
    },
    
    props: {
        facade: {
            type: [Object, Array]
        },
        content: {
            type: [Object, Array]
        }
    },
    data() {
        return {
          
        };
    },
    /**
     * 计算属性
     * @type {Object}
     */
    computed: {
       
    },
    /**
     * 页面渲染前
     * @return {[type]} [description]
     */
    created() {

    },
    /**
     * 数据监听
     * @type {Object}
     */
    watch: {
        content: {
            deep: true,
            handler: function(newV, oldV) {
                this.handleCheck();
            }
        },
        facade: {
            deep: true,
            handler: function(newV, oldV) {
                this.handleCheck();
            }
        }
    },
    /**
     * 页面加载执行
     * @return {[type]} [description]
     */
    async mounted() {
        this.handleCheck();
    },
    methods: {
        handleCheck() {
           
        },
        getCover(cover = "") {
            let url = "/images/shark/le-default-goods-bg.png";
            if (cover) {
                return cover;
            }
            return url;
        },
        //开始拖拽事件
        onStart() {
            this.drag = true;
        },
        //拖拽结束事件
        onEnd() {
            this.drag = false;
        }
    }
};
</script>
<style lang="less" scoped>
@import './element.less';
</style>